<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->
    
    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
      <a-button type="primary" icon="download" @click="handleExportXls('OA项目进度表')">导出</a-button>
      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
        <a-button type="primary" icon="import">导入</a-button>
      </a-upload>
      <!-- 高级查询区域 -->
      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
      <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-menu slot="overlay">
          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
        </a-menu>
        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
      </a-dropdown>
      <!-- 规定显示隐藏的表头 -->
      <a-button style="margin-left: 8px" @click="btnShowHideBom"> {{ showHideBom }}</a-button>

      <!-- 选择显示隐藏表头 -->
      <a-dropdown :trigger="['click']" style="margin-bottom: 10px" v-model="DropdownVisible">
        <a-menu slot="overlay">
          <a-menu-item v-for="(item, index) in columns" :key="index"
            ><a-checkbox
              :checked="item.show"
              @change="
                (e) => {
                  columnsCheck(e.target.checked, columns, index)
                }
              "
              >{{ item.title }}</a-checkbox
            ></a-menu-item
          >
        </a-menu>
        <a-button style="margin-left: 8px"> 勾选需要显示的列<a-icon type="down" /> </a-button>
      </a-dropdown>

    </div>

    <!-- table区域-begin -->
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
      </div>

      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :columns="
          columns.filter((col, num) => {
            if (col.show) {
              return col
            }
          })
        "
        class="j-table-force-nowrap"
        :scroll="{x:true}"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        @change="handleTableChange">

        <!-- 年份 -->
      <div slot="oaYear" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 客户名称 -->
      <div slot="oaCustomerName" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 客户编号 -->
      <div slot="oaCustomerNum" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 钳工担当 -->
      <div slot="oaFitterResponsible" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 项目担当 -->
      <div slot="oaProjectResponsible" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- CHT模号 -->
      <div slot="oaCht" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 产品编号 -->
      <div slot="oaProductNumber" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 产品名称 -->
      <div slot="oaProductName" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 产品材料T100编号 -->
      <div slot="oaT100Number" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 产品外型尺寸 -->
      <div slot="oaProductSize" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 外观要求 -->
      <div slot="oaAppearanceRequirements" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 嵌件有无 -->
      <div slot="oaInsertsPresent" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 嵌入方式 -->
      <div slot="oaEmbedMode" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 喷油 -->
      <div slot="oaFuelInjection" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 丝印 -->
      <div slot="oaSilkscreen" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 电镀 -->
      <div slot="oaElectroplating" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 省模等级 -->
      <div slot="oaProvinceModelLevel" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 备注 -->
      <div slot="oaRemark" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 产品图片 -->
      <div slot="pic" slot-scope="text,record">
          <span style="white-space: pre-line">
            
          </span>
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
        </div>

        <!-- 客户模具管理编号 -->
      <div slot="oaMoldManagementNumber" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 模具尺寸（宽高厚） -->
      <div slot="oaMoldSize" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 模具结构 -->
      <div slot="oaMoldStructure" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 流道方式 -->
      <div slot="oaFlowChannelMode" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 进胶方式 -->
      <div slot="oaGlueFeedingMode" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 进胶点数 -->
      <div slot="oaFeedingPoints" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 模仁材质 -->
      
        <!-- 前模 -->
      <div slot="oaBeforeMold" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 后模 -->
      <div slot="oaAfterMold" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 行位 -->
      <div slot="oaSlide" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 模具穴数 -->
      <div slot="oaCavityNumbe" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 蚀纹有无 -->
      <div slot="oaEtching" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 纹号 -->
      <div slot="oaGrainNumber" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 缩水率 -->
      <div slot="oaShrinkage" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 模具难度 -->
      <div slot="oaMoldDifficulty" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 模具寿命 -->
      <div slot="oaDieLife" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 顶出方案 -->
      <div slot="oaEjectorScheme" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 热流道品牌 -->
      <div slot="oaHotRunnerBrand" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 模胚材质 -->
      <div slot="oaMouldMaterial" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 模具种类 -->
      <div slot="oaMoldType" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 成型周期（报价） -->
      <div slot="moldingCycleQuotation" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 成型周期（目标） -->
      <div slot="moldingCycleAim" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 成型周期（实际） -->
      <div slot="moldingCycleActual" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 成型吨位（报价） -->
      <div slot="formingTonnageQuotation" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 成型吨位（目标） -->
      <div slot="formingTonnageAim" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 成型吨位（实际） -->
      <div slot="formingTonnageActual" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 产品单重（报价） -->
      <div slot="productWeightQuotation" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 产品单重（目标） -->
      <div slot="productWeightAim" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 产品单重（实际） -->
      <div slot="productWeightActual" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 水口单重（报价） -->
      <div slot="shuikouUnitWeightQuotation" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 水口单重（目标） -->
      <div slot="shuikouUnitWeightAim" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 水口单重（实际） -->
      <div slot="shuikouUnitWeightActual" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>
        <!-- 特别注意的成型事项 -->
      <div slot="precautions" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <!-- 操作 -->
      <div slot="action" slot-scope="text">
          <span style="white-space: pre-line">
            {{ text }}
          </span>
        </div>

        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </template>
        <template slot="imgSlot" slot-scope="text,record">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)">
            下载
          </a-button>
        </template>

        <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)">编辑</a>

          <a-divider type="vertical" />
          <a-dropdown>
            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a @click="handleDetail(record)">详情</a>
              </a-menu-item>
              <a-menu-item>
                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>
            </a-menu>
          </a-dropdown>
        </span>

      </a-table>
    </div>

    <oa-project-progress-table-modal ref="modalForm" @ok="modalFormOk"/>
  </a-card>
</template>

<script>

  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import OaProjectProgressTableModal from './modules/OaProjectProgressTableModal'
  import '@/assets/less/TableExpand.less'

  export default {
    name: "OaProjectProgressTableList",
    mixins:[JeecgListMixin],
    components: {
      OaProjectProgressTableModal
    },
    data () {
      return {
        description: 'OA项目进度表管理页面',
        DropdownVisible: false,
        // 表头
        columns: [
          {
            title: '#',
            dataIndex: '',
            key:'rowIndex',
            width:60,
            align:"center",
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            }
          },
          {
            title:'年份',
            align:"center",
            dataIndex: 'oaYear',
            scopedSlots: { customRender: 'oaYear' },
            show: false,
          },
          {
            title:'客户名称',
            align:"center",
            dataIndex: 'oaCustomerName',
            scopedSlots: { customRender: 'oaCustomerName' },
            show: true,
          },
          {
            title:'客户编号',
            align:"center",
            dataIndex: 'oaCustomerNum',
            scopedSlots: { customRender: 'oaCustomerNum' },
            show: false,
          },
          {
            title:'钳工担当',
            align:"center",
            dataIndex: 'oaFitterResponsible',
            scopedSlots: { customRender: 'oaFitterResponsible' },
            show: true,
          },
          {
            title:'项目担当',
            align:"center",
            dataIndex: 'oaProjectResponsible',
            scopedSlots: { customRender: 'oaProjectResponsible' },
            show: true,
          },
          {
            title:'CHT模号',
            align:"center",
            dataIndex: 'oaCht',
            scopedSlots: { customRender: 'oaCht' },
            show: true,
          },
          {
            title:'产品编号',
            align:"center",
            dataIndex: 'oaProductNumber',
            scopedSlots: { customRender: 'oaProductNumber' },
            show: true,
          },
          {
            title:'产品名称',
            align:"center",
            dataIndex: 'oaProductName',
            scopedSlots: { customRender: 'oaProductName' },
            show: true,
          },
          {
            title:'产品材料T100编号',
            align:"center",
            dataIndex: 'oaT100Number',
            scopedSlots: { customRender: 'oaT100Number' },
            show: true,
          },
          {
            title:'产品外型尺寸',
            align:"center",
            dataIndex: 'oaProductSize',
            scopedSlots: { customRender: 'oaProductSize' },
            show: true,
          },
          {
            title:'外观要求',
            align:"center",
            dataIndex: 'oaAppearanceRequirements',
            scopedSlots: { customRender: 'oaAppearanceRequirements' },
            show: true,
          },
          {
            title:'嵌件有无',
            align:"center",
            dataIndex: 'oaInsertsPresent',
            scopedSlots: { customRender: 'oaInsertsPresent' },
            show: true,
          },
          {
            title:'嵌入方式',
            align:"center",
            dataIndex: 'oaEmbedMode',
            scopedSlots: { customRender: 'oaEmbedMode' },
            show: true,
          },
          {
            title:'喷油',
            align:"center",
            dataIndex: 'oaFuelInjection',
            scopedSlots: { customRender: 'oaFuelInjection' },
            show: true,
          },
          {
            title:'丝印',
            align:"center",
            dataIndex: 'oaSilkscreen',
            scopedSlots: { customRender: 'oaSilkscreen' },
            show: true,
          },
          {
            title:'电镀',
            align:"center",
            dataIndex: 'oaElectroplating',
            scopedSlots: { customRender: 'oaElectroplating' },
            show: true,
          },
          
          {
            title:'省模等级',
            align:"center",
            dataIndex: 'oaProvinceModelLevel',
            scopedSlots: { customRender: 'oaProvinceModelLevel' },
            show: true,
          },
          {
            title:'备注',
            align:"center",
            dataIndex: 'oaRemark',
            scopedSlots: { customRender: 'oaRemark' },
            show: true,
          },
          {
            title:'产品图片',
            align:"center",
            dataIndex: 'pic',
            scopedSlots: { customRender: 'pic' },
            show: true,
          },
          {
            title:'客户模具管理编号',
            align:"center",
            dataIndex: 'oaMoldManagementNumber',
            scopedSlots: { customRender: 'oaMoldManagementNumber' },
            show: true,
          },
          {
            title:'模具尺寸(宽高厚)',
            align:"center",
            dataIndex: 'oaMoldSize',
            scopedSlots: { customRender: 'oaMoldSize' },
            show: true,
          },
          {
            title:'模具结构',
            align:"center",
            dataIndex: 'oaMoldStructure',
            scopedSlots: { customRender: 'oaMoldStructure' },
            show: true,
          },
          {
            title:'流道方式',
            align:"center",
            dataIndex: 'oaFlowChannelMode',
            scopedSlots: { customRender: 'oaFlowChannelMode' },
            show: true,
          },
          {
            title:'进胶方式',
            align:"center",
            dataIndex: 'oaGlueFeedingMode',
            scopedSlots: { customRender: 'oaGlueFeedingMode' },
            show: true,
          },
          {
            title:'进胶点数',
            align:"center",
            dataIndex: 'oaFeedingPoints',
            scopedSlots: { customRender: 'oaFeedingPoints' },
            show: true,
          },
          
          {
            title:'前模',
            align:"center",
            dataIndex: 'oaBeforeMold',
            scopedSlots: { customRender: 'oaBeforeMold' },
            show: true,
          },
          {
            title:'后模',
            align:"center",
            dataIndex: 'oaAfterMold',
            scopedSlots: { customRender: 'oaAfterMold' },
            show: true,
          },
          {
            title:'行位',
            align:"center",
            dataIndex: 'oaSlide',
            scopedSlots: { customRender: 'oaSlide' },
            show: true,
          },
          {
            title:'模具穴数(取数)',
            align:"center",
            dataIndex: 'oaCavityNumbe',
            scopedSlots: { customRender: 'oaCavityNumbe' },
            show: true,
          },
          {
            title:'蚀纹有无',
            align:"center",
            dataIndex: 'oaEtching',
            scopedSlots: { customRender: 'oaEtching' },
            show: true,
          },
          {
            title:'纹号',
            align:"center",
            dataIndex: 'oaGrainNumber',
            scopedSlots: { customRender: 'oaGrainNumber' },
            show: true,
          },
          {
            title:'缩水率',
            align:"center",
            dataIndex: 'oaShrinkage',
            scopedSlots: { customRender: 'oaShrinkage' },
            show: true,
          },
          {
            title:'模具难度',
            align:"center",
            dataIndex: 'oaMoldDifficulty',
            scopedSlots: { customRender: 'oaMoldDifficulty' },
            show: true,
          },
          {
            title:'模具寿命',
            align:"center",
            dataIndex: 'oaDieLife',
            scopedSlots: { customRender: 'oaDieLife' },
            show: true,
          },
          {
            title:'顶出方案',
            align:"center",
            dataIndex: 'oaEjectorScheme',
            scopedSlots: { customRender: 'oaEjectorScheme' },
            show: true,
          },
          {
            title:'热流道品牌',
            align:"center",
            dataIndex: 'oaHotRunnerBrand',
            scopedSlots: { customRender: 'oaHotRunnerBrand' },
            show: true,
          },
          {
            title:'模胚材质',
            align:"center",
            dataIndex: 'oaMouldMaterial',
            scopedSlots: { customRender: 'oaMouldMaterial' },
            show: true,
          },
          {
            title:'模具种类',
            align:"center",
            dataIndex: 'oaMoldType',
            scopedSlots: { customRender: 'oaMoldType' },
            show: true,
          },
          {
            title:'成型周期(报价)',
            align:"center",
            dataIndex: 'moldingCycleQuotation',
            scopedSlots: { customRender: 'moldingCycleQuotation' },
            show: true,
          },
          {
            title:'成型周期(目标)',
            align:"center",
            dataIndex: 'moldingCycleAim',
            scopedSlots: { customRender: 'moldingCycleAim' },
            show: true,
          },
          {
            title:'成型周期(实际)',
            align:"center",
            dataIndex: 'moldingCycleActual',
            scopedSlots: { customRender: 'moldingCycleActual' },
            show: true,
          },
          {
            title:'成型吨位(报价)',
            align:"center",
            dataIndex: 'formingTonnageQuotation',
            scopedSlots: { customRender: 'formingTonnageQuotation' },
            show: true,
          },
          {
            title:'成型吨位(目标)',
            align:"center",
            dataIndex: 'formingTonnageAim',
            scopedSlots: { customRender: 'formingTonnageAim' },
            show: true,
          },
          {
            title:'成型吨位(实际)',
            align:"center",
            dataIndex: 'formingTonnageActual',
            scopedSlots: { customRender: 'formingTonnageActual' },
            show: true,
          },
          {
            title:'产品单重(报价)',
            align:"center",
            dataIndex: 'productWeightQuotation',
            scopedSlots: { customRender: 'productWeightQuotation' },
            show: true,
          },
          {
            title:'产品单重(目标)',
            align:"center",
            dataIndex: 'productWeightAim',
            scopedSlots: { customRender: 'productWeightAim' },
            show: true,
          },
          {
            title:'产品单重(实际)',
            align:"center",
            dataIndex: 'productWeightActual',
            scopedSlots: { customRender: 'productWeightActual' },
            show: true,
          },
          {
            title:'水口单重(报价)',
            align:"center",
            dataIndex: 'shuikouUnitWeightQuotation',
            scopedSlots: { customRender: 'shuikouUnitWeightQuotation' },
            show: true,
          },
          {
            title:'水口单重(目标)',
            align:"center",
            dataIndex: 'shuikouUnitWeightAim',
            scopedSlots: { customRender: 'shuikouUnitWeightAim' },
            show: true,
          },
          {
            title:'水口单重(实际)',
            align:"center",
            dataIndex: 'shuikouUnitWeightActual',
            scopedSlots: { customRender: 'shuikouUnitWeightActual' },
            show: true,
          },
          {
            title:'特别注意的成型事项',
            align:"center",
            dataIndex: 'precautions',
            scopedSlots: { customRender: 'precautions' },
            show: true,
          },
          {
            title: '操作',
            dataIndex: 'action',
            align:"center",
            fixed:"right",
            width:147,
            scopedSlots: { customRender: 'action' },
            show: true,
          }
        ],
        url: {
          list: "/ch/oaProjectProgressTable/mpList",
          delete: "/ch/oaProjectProgressTable/delete",
          deleteBatch: "/ch/oaProjectProgressTable/deleteBatch",
          exportXlsUrl: "/ch/oaProjectProgressTable/exportXls",
          importExcelUrl: "ch/oaProjectProgressTable/importExcel",
          
        },
        dictOptions:{},
        superFieldList:[],
      }
    },
    created() { 
      this.getSuperFieldList();
      this.btnShowHideBom();
    },
    computed: {
      importExcelUrl: function(){
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
      }
    },
    methods: {
      initDictConfig(){
      },
      // 固定显示隐藏表头
      btnShowHideBom() {
            this.flag = !this.flag
            if (this.flag == true) {
                this.showHideBom = "显示勾选项"
                    // 根据固定表头的index隐藏设计BOM
                for (let index = 0; index < 8; index++) {
                    this.columns[index].show = false
                }

            } else if (this.flag == false) {
                this.showHideBom = "隐藏显示勾选项"

                // 根据固定表头的index显示设计BOM
                for (let index = 0; index < 8; index++) {
                    this.columns[index].show = true
                }
            }
        },
      getSuperFieldList(){
        let fieldList=[];
         fieldList.push({type:'string',value:'oaYear',text:'年份',dictCode:''})
         fieldList.push({type:'string',value:'oaCustomerName',text:'客户名称',dictCode:''})
         fieldList.push({type:'string',value:'oaCustomerNum',text:'客户编号',dictCode:''})
         fieldList.push({type:'string',value:'oaFitterResponsible',text:'钳工担当',dictCode:''})
         fieldList.push({type:'string',value:'oaProjectResponsible',text:'项目担当',dictCode:''})
         fieldList.push({type:'string',value:'oaCht',text:'CHT模号',dictCode:''})
         fieldList.push({type:'string',value:'oaProductNumber',text:'产品编号',dictCode:''})
         fieldList.push({type:'string',value:'oaProductName',text:'产品名称',dictCode:''})
         fieldList.push({type:'string',value:'oaT100Number',text:'产品材料T100编号',dictCode:''})
         fieldList.push({type:'string',value:'oaProductSize',text:'产品外型尺寸',dictCode:''})
         fieldList.push({type:'string',value:'oaAppearanceRequirements',text:'外观要求',dictCode:''})
         fieldList.push({type:'string',value:'oaInsertsPresent',text:'嵌件有无',dictCode:''})
         fieldList.push({type:'string',value:'oaEmbedMode',text:'嵌入方式',dictCode:''})
         fieldList.push({type:'string',value:'oaFuelInjection',text:'喷油',dictCode:''})
         fieldList.push({type:'string',value:'oaSilkscreen',text:'丝印',dictCode:''})
         fieldList.push({type:'string',value:'oaElectroplating',text:'电镀',dictCode:''})
         fieldList.push({type:'string',value:'oaProvinceModelLevel',text:'省模等级',dictCode:''})
         fieldList.push({type:'string',value:'oaRemark',text:'备注',dictCode:''})
         fieldList.push({type:'string',value:'pic',text:'产品图片',dictCode:''})
         fieldList.push({type:'string',value:'oaMoldManagementNumber',text:'客户模具管理编号',dictCode:''})
         fieldList.push({type:'string',value:'oaMoldSize',text:'模具尺寸(宽高厚)',dictCode:''})
         fieldList.push({type:'string',value:'oaMoldStructure',text:'模具结构',dictCode:''})
         fieldList.push({type:'string',value:'oaFlowChannelMode',text:'流道方式',dictCode:''})
         fieldList.push({type:'string',value:'oaGlueFeedingMode',text:'进胶方式',dictCode:''})
         fieldList.push({type:'string',value:'oaFeedingPoints',text:'进胶点数',dictCode:''})
         //fieldList.push({type:'string',value:'oaMoldMaterial',text:'模仁材质',dictCode:''})
         fieldList.push({type:'string',value:'oaBeforeMold',text:'前模',dictCode:''})
         fieldList.push({type:'string',value:'oaAfterMold',text:'后模',dictCode:''})
         fieldList.push({type:'string',value:'oaSlide',text:'行位',dictCode:''})
         fieldList.push({type:'string',value:'oaCavityNumbe',text:'模具穴数(取数)',dictCode:''})
         fieldList.push({type:'string',value:'oaEtching',text:'蚀纹有无',dictCode:''})
         fieldList.push({type:'string',value:'oaGrainNumber',text:'纹号',dictCode:''})
         fieldList.push({type:'string',value:'oaShrinkage',text:'缩水率',dictCode:''})
         fieldList.push({type:'string',value:'oaMoldDifficulty',text:'模具难度',dictCode:''})
         fieldList.push({type:'string',value:'oaDieLife',text:'模具寿命',dictCode:''})
         fieldList.push({type:'string',value:'oaEjectorScheme',text:'顶出方案',dictCode:''})
         fieldList.push({type:'string',value:'oaHotRunnerBrand',text:'热流道品牌',dictCode:''})
         fieldList.push({type:'string',value:'oaMouldMaterial',text:'模胚材质',dictCode:''})
         fieldList.push({type:'string',value:'oaMoldType',text:'模具种类',dictCode:''})
         fieldList.push({type:'string',value:'moldingCycleQuotation',text:'成型周期(报价)',dictCode:''})
         fieldList.push({type:'string',value:'moldingCycleAim',text:'成型周期(目标)',dictCode:''})
         fieldList.push({type:'string',value:'moldingCycleActual',text:'成型周期(实际)',dictCode:''})
         fieldList.push({type:'string',value:'formingTonnageQuotation',text:'成型吨位(报价)',dictCode:''})
         fieldList.push({type:'string',value:'formingTonnageAim',text:'成型吨位(目标)',dictCode:''})
         fieldList.push({type:'string',value:'formingTonnageActual',text:'成型吨位(实际)',dictCode:''})
         fieldList.push({type:'string',value:'productWeightQuotation',text:'产品单重(报价)',dictCode:''})
         fieldList.push({type:'string',value:'productWeightAim',text:'产品单重(目标)',dictCode:''})
         fieldList.push({type:'string',value:'productWeightActual',text:'产品单重(实际)',dictCode:''})
         fieldList.push({type:'string',value:'shuikouUnitWeightQuotation',text:'水口单重(报价)',dictCode:''})
         fieldList.push({type:'string',value:'shuikouUnitWeightAim',text:'水口单重(目标)',dictCode:''})
         fieldList.push({type:'string',value:'shuikouUnitWeightActual',text:'水口单重(实际)',dictCode:''})
         fieldList.push({type:'Text',value:'precautions',text:'特别注意的成型事项',dictCode:''})
        this.superFieldList = fieldList
      }
    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less';
</style>